package com.ssy.lingxi.order.model.vo.process.request;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 新增采购流程规则接口参数
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-24
 */
public class OrderPurchaseProcessVO implements Serializable {
    private static final long serialVersionUID = -3434842687841394278L;

    /**
     * 规则名称
     */
    @NotBlank(message = "流程规则名称不能为空")
    @Size(max = 50, message = "流程规则名称最长50个字符")
    private String name;

    /**
     * 基础流程Id
     */
    @NotNull(message = "基础流程Id要大于0")
    @Positive(message = "基础流程Id要大于0")
    private Long baseProcessId;

    /**
     * 是否适用所有合同，true-是，false-否
     */
    @NotNull(message = "是否适用所有合同属性不能为空")
    private Boolean allContracts;

    /**
     * 适用合同列表，如不是适用所有合同，此列表不能为空
     */
    @Valid
    private List<OrderPurchaseProcessContractVO> contracts;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getBaseProcessId() {
        return baseProcessId;
    }

    public void setBaseProcessId(Long baseProcessId) {
        this.baseProcessId = baseProcessId;
    }

    public Boolean getAllContracts() {
        return allContracts;
    }

    public void setAllContracts(Boolean allContracts) {
        this.allContracts = allContracts;
    }

    public List<OrderPurchaseProcessContractVO> getContracts() {
        return contracts;
    }

    public void setContracts(List<OrderPurchaseProcessContractVO> contracts) {
        this.contracts = contracts;
    }
}
